package base.study.chapter6;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * TODO(用一句话描述方法的主要功能)
 */
public class TimerTest {

    class TimePrinter implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            System.out.println("打印一个");
        }
    }

    public static void main(String[] args) {
        ActionListener listener = new TimerTest().new TimePrinter();

        Timer t = new Timer(10*1000,listener);
        t.start();
        JOptionPane.showMessageDialog(null,"Quite?");
        System.exit(0);
    }
}

